﻿@model Bongiozzo.Controllers.HomeViewBag
@{
    Layout = null;
}
@foreach (var item in Model.FlickrProjects)
{
    var i = 0;
    <h2>@item.Title.ToLower()</h2>
    <div class="project">
    <div class="project_photo">
        <a href="@Url.Action("Gallery", new { id = item.PrimaryPhoto.PhotoId, photoset = item.PhotosetId, controller = "Home" })">
            <img title="@item.Title" src="@item.PrimaryPhoto.Medium640Url"/>
            <span class="fullscreen" />
        </a>
    </div>
    <div class="project_photos">
    @foreach (var pht in item.Photos)
    {
        if (pht.PhotoId == item.PrimaryPhoto.PhotoId) {
            continue;
        }
        <div class="project_small_photo">
            <a href="@Url.Action("Gallery", new { id = pht.PhotoId, photoset = item.PhotosetId, controller = "Home" })"><img src="@pht.SquareThumbnailUrl" title="@pht.Title" /><span class="fullscreen" /></a>
        </div>
        i++;
        if (i > 5) {
            break;
        }
    }
    </div>
    <p class="project_description">@Html.Raw(@item.Description.Replace("\n","<br/>"))</p>
    </div>
}